package com.itheima.myfile.myfiledemo;

import java.io.File;
import java.io.IOException;

public class FileDemo02 {
    public static void main(String[] args) throws IOException {
        File file1 = new File("D:\\dev\\a.txt");
        boolean flag = file1.isDirectory();
        System.out.println("flag = " + flag);
//        boolean newFile = file1.createNewFile();
//        System.out.println("newFile = " + newFile);
//
//        //第二种
//        File file2 = new File("D:\\dev\\a.txt");
//        boolean mkdirs = file2.mkdirs();
//        System.out.println("mkdirs = " + mkdirs);
    }
}
